<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>弹性盒子基本使用</title>
		
		
		<style>
			.box{
				border: 1px red solid;
				width: 580px;
				height: 480px;
				margin: 0 auto;
				/* 设置弹性盒子 */
				display: flex;
				/* 自动换行 */
				flex-wrap: wrap;
				/* 子元素排列方式 */
				flex-direction: row;
				/* 主轴对齐方向--水平对齐方向 */
				justify-content: flex-end;
				/* 侧轴对齐方式--垂直对齐方式 */
				align-items: center;
			}
			
			.itme{
				background-color: aqua;
				width: 100px;
				height: 100px;
				margin-top: 5px;
				font-size: 30px;
			}
			
			/* 设置每个子元素 */
				/* 选择box的第一个itme */
			.box .itme:nth-child(5n+1){ 
				height: 80px;
			}
			.box .itme:nth-child(5n+2){
				height: 180px;
			}
			.box .itme:nth-child(5n+3){
				height: 150px;
			}
			.box .itme:nth-child(5n+4){
				height: 100px;
			}
			
			
			
		</style>
	</head>
	<body>
		
		<div class="box">
			<div class="itme">01</div>
			<div class="itme">02</div>
			<div class="itme">03</div>
			<div class="itme">04</div>
			<div class="itme">05</div>
			<div class="itme">06</div>
			<div class="itme">07</div>
			<div class="itme">08</div>
			<div class="itme">09</div>
			<div class="itme">10</div>
			<div class="itme">11</div>
			<div class="itme">12</div>
		</div>
		
	</body>
</html>